import Layout from '@/layout'

const courseRouter = {
  path: '/course',
  component: Layout,
  redirect: '',
  name: 'Course',
  meta: {
    title: '课程管理',
    icon: '课程管理'
  },
  children: [
    {
      path: 'curriculum',
      redirect: '/course/curriculum/courseList',
      component: () => import('@/views/course/curriculum'),
      name: 'Course',
      meta: { title: '课程管理列表', icon: '课程管理' },
      children: [
        {
          path: 'courseList',
          hidden: true,
          component: () => import('@/views/course/curriculum/list'),
          name: 'CourseList',
          meta: { title: '课程列表', noCache: true, keepAlive: true }
        },
        {
          path: 'courseAdd',
          hidden: true,
          component: () => import('@/views/course/curriculum/add'),
          name: 'CourseAdd',
          meta: { title: '新建课程', noCache: true }
        },
        {
          path: 'courseEdit',
          hidden: true,
          component: () => import('@/views/course/curriculum/edit'),
          name: 'CourseEdit',
          meta: { title: '编辑课程', noCache: true }
        },
        {
          path: 'draft',
          hidden: true,
          component: () => import('@/views/course/curriculum/draft'),
          name: 'CourseDraft',
          meta: { title: '草稿课程', noCache: true }
        },
        {
          path: 'courseCategory',
          hidden: true,
          component: () => import('@/views/course/curriculum/courseCategory'),
          name: 'courseCategory',
          meta: { title: '新课分类' }
        }
      ]
    },
    {
      path: 'classManagementList',
      component: () => import('@/views/course/classManagementList/index'),
      name: 'ClassManagementList',
      meta: { title: '课程保障计划', icon: '课程分类管理' }
    },
    {
      path: 'classifyManagement',
      component: () => import('@/views/course/classify/index'),
      name: 'ClassifyManagement',
      meta: { title: '课程分类管理', icon: '课程分类管理' },
      children: [
        {
          path: 'courseClassifyList',
          component: () => import('@/views/course/classify/courseClassifyList'),
          name: 'CourseClassifyList',
          meta: { title: '课程分类管理', noCache: true }
        },
        {
          path: 'courseClassifyEdit/:id',
          component: () => import('@/views/course/classify/courseClassifyEdit'),
          name: 'CourseClassifyEdit',
          meta: { title: '课程分类编辑' },
          hidden: true
        },
        {
          path: 'courseClassifyAdd',
          component: () => import('@/views/course/classify/courseClassifyAdd'),
          name: 'CourseClassifyAdd',
          meta: { title: '课程分类新增' },
          hidden: true
        }
      ]
    },
    {
      path: 'kindManagement',
      component: () => import('@/views/course/kind/index'),
      name: 'KindManagement',
      meta: { title: '课程性质管理', icon: '课程性质管理' },
      children: [
        {
          path: 'courseKindList',
          component: () => import('@/views/course/kind/courseKindList'),
          name: 'CourseKindList',
          meta: { title: '课程性质管理', noCache: true }
        },
        {
          path: 'courseKindEdit/:id',
          component: () => import('@/views/course/kind/courseKindEdit'),
          name: 'CourseKindEdit',
          meta: { title: '课程性质编辑' },
          hidden: true
        },
        {
          path: 'courseKindAdd',
          component: () => import('@/views/course/kind/courseKindAdd'),
          name: 'CourseKindAdd',
          meta: { title: '课程性质新增' },
          hidden: true
        }
      ]
    },
    {
      path: 'labelManagement',
      component: () => import('@/views/course/label/index'),
      name: 'LabelManagement',
      meta: { title: '课程标签管理', icon: '课程标签管理' },
      children: [
        {
          path: 'courseLabelList',
          component: () => import('@/views/course/label/courseLabelList'),
          name: 'CourseLabelList',
          meta: { title: '课程标签管理', noCache: true }
        },
        {
          path: 'courseLabelEdit/:id',
          component: () => import('@/views/course/label/courseLabelEdit'),
          name: 'CourseLabelEdit',
          meta: { title: '课程标签编辑' },
          hidden: true
        },
        {
          path: 'courseLabelAdd',
          component: () => import('@/views/course/label/courseLabelAdd'),
          name: 'courseLabelAdd',
          meta: { title: '课程标签新增' },
          hidden: true
        }
      ]
    }

  ]
}
export default courseRouter
